package com.tydic.borderer.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tydic.borderer.domain.BorderAgent;
import com.tydic.borderer.domain.BordererInfo;
import com.tydic.borderer.domain.bo.AddBordererAgentBo;
import com.tydic.borderer.domain.bo.BorderAgentByPageBo;
import com.tydic.borderer.domain.bo.RenewContractBo;
import com.tydic.common.web.domain.FileItem;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

public interface IBorderAgentService {
    Page<BorderAgent> queryAduitSymbolList(BorderAgentByPageBo request);

    Page<BorderAgent> queryAduitAgentList(BorderAgentByPageBo request);

    boolean addBorderAgent(BorderAgent borderAgent, String userCode);

    boolean addBorderAgent(BordererInfo bordererInfo, AddBordererAgentBo request);

    String agree(String id);

    boolean remove(BorderAgent borderAgent, String userCode, String bordererAgent);

    void remove(String bordererId);

    void agreeRemove(String categoryId);

    void refuse(String categoryId);

    BorderAgent findByBordererId(BorderAgent borderAgent);

    FileItem fillContract(BorderAgent borderAgent);

    void uploadAndUpdate(BorderAgent borderAgent);

    String getSignUrl(String agentId);

    boolean createAndPush(BorderAgent borderAgent);

    void getContractPageView(String agentId, HttpServletResponse response);

    String inviteBorderer(AddBordererAgentBo request);

    String renewContract(RenewContractBo request);

    void refuseRemove(String categoryId);

    long getCountByAgentBordererId(String agentBordererId);

    void updateOutOfDateBorderAgent(String bordererId);

    BorderAgent findByAgentBordererId(String agentBordererId);

    BorderAgent findByBordererId(String bordererId);

    BorderAgent findById(String id);

    List<BorderAgent> findBorderAgentsByAgentBordererId(String agentBordererId);

    /**
     * 作废上一个边民代表关系
     *
     * @param id 边民代表关系ID
     */
    void invalidPreviousBorderAgent(String id);

    List<BorderAgent> findByBordererIdOrAgentBordererId(String bordererId, String agentBordererId);

}
